home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / qmap20b3.zip / QM.BAT < prev    next >
DOS Batch File  |  1996-10-01  |  3KB  |  114 lines

  1. @echo off
  2. echo  *************************************
  3. echo *** QuakeMap Batch for DOS run-time ***
  4. echo  *************************************
  5. echo.
  6.  
  7. rem ***  Quake root directory is set here : ***
  8. set QUAKE=\QUAKE
  9. set TOOLDIR=.
  10.  
  11. if "%1"=="" goto Info
  12.  
  13. :Loop
  14. if "%1"=="" goto Stop
  15. if "%1"=="B" goto Rebuild
  16. if "%1"=="b" goto Rebuild
  17. if "%1"=="K" goto RebuildQuick
  18. if "%1"=="k" goto RebuildQuick
  19. if "%1"=="1" goto QBSP
  20. if "%1"=="2" goto VIS
  21. if "%1"=="3" goto LIGHT
  22. if "%1"=="Q" goto Run
  23. if "%1"=="q" goto Run
  24. goto Info
  25.  
  26. :Rebuild
  27. shift
  28. cd %QUAKE%\QMapExec\maps
  29. if not exist %TOOLDIR%\QBSP.EXE goto BuildError
  30. if not exist %TOOLDIR%\VIS.EXE goto BuildError
  31. if not exist %TOOLDIR%\LIGHT.EXE goto BuildError
  32. %TOOLDIR%\QBSP %1
  33. if not exist %1.bsp goto QBSPError
  34. %TOOLDIR%\VIS %1
  35. %TOOLDIR%\LIGHT %1
  36. shift
  37. goto Loop
  38.  
  39. :RebuildQuick
  40. shift
  41. cd %QUAKE%\QMapExec\maps
  42. if not exist %TOOLDIR%\QBSP.EXE goto BuildError
  43. if not exist %TOOLDIR%\LIGHT.EXE goto BuildError
  44. %TOOLDIR%\QBSP %1
  45. if not exist %1.bsp goto QBSPError
  46. %TOOLDIR%\LIGHT %1
  47. shift
  48. goto Loop
  49.  
  50. :QBSP
  51. shift
  52. cd %QUAKE%\QMapExec\maps
  53. if not exist %TOOLDIR%\QBSP.EXE goto BuildError
  54. %TOOLDIR%\QBSP %1
  55. if not exist %1.bsp goto QBSPError
  56. shift
  57. goto Loop
  58.  
  59. :VIS
  60. shift
  61. cd %QUAKE%\QMapExec\maps
  62. if not exist %TOOLDIR%\VIS.EXE goto BuildError
  63. %TOOLDIR%\VIS %1
  64. shift
  65. goto Loop
  66.  
  67. :LIGHT
  68. shift
  69. cd %QUAKE%\QMapExec\maps
  70. if not exist %TOOLDIR%\LIGHT.EXE goto BuildError
  71. %TOOLDIR%\LIGHT %1
  72. shift
  73. goto Loop
  74.  
  75. :QBSPError
  76. echo.
  77. echo -----------------------------------------------------------------------------
  78. echo QBSP failed.  Press any key to return to QuakeMap...
  79. pause > nul
  80. goto Stop
  81.  
  82. :BuildError
  83. echo.
  84. echo Build error : you should copy QBSP.EXE, VIS.EXE and LIGHT.EXE in QuakeMap
  85. echo directory. These three files are required to build levels. They can be found
  86. echo at any Quake-related ftp server (including ftp.cdrom.com/pub/idgames2).
  87. echo.
  88. pause
  89. goto Stop
  90.  
  91. :Run
  92. cd %QUAKE%
  93. if not exist QMapExec\*.* md QMapExec
  94. echo exec default.cfg > %QUAKE%\QMapExec\quake.rc
  95. echo exec config.cfg >> %QUAKE%\QMapExec\quake.rc
  96. echo exec autoexec.cfg >> %QUAKE%\QMapExec\quake.rc
  97. echo exec qmapexec.cfg >> %QUAKE%\QMapExec\quake.rc
  98. echo stuffcmds >> %QUAKE%\QMapExec\quake.rc
  99. if exist QMapExec\config.cfg del QMapExec\config.cfg
  100.  
  101. Quake -game QMapExec %2 %3 %4 %5 %6 %7 %8 %9
  102.  
  103. goto Stop
  104.  
  105. :Info
  106. echo.
  107. echo This batch may not be run directly now. Reserved for future use.
  108. echo.
  109.  
  110. :Stop
  111. cd %TOOLDIR%
  112. set TOOLDIR=
  113. set QUAKE=
  114.